* {
    margin: 0;
    padding: 0;
    border: 0;
    vertical-align: baseline;
    user-select: none;
}

#titlebar * {
    font-family: "Segoe MDL2 Assets";
}

html {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    --window-border: #222;
    box-shadow: 0 0 0 1px var(--window-border) inset;
}

*, *:before, *:after {
    box-sizing: inherit;
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
}

body {
    font-family: system-ui;
}

h1 {
    margin: 0 0 10px 0;
    font-weight: 600;
    line-height: 1.2;
}

p {
    margin-top: 10px;
}

body {
    overflow-y: hidden;
}

#titlebar {
    display: block;
    position: fixed;
    height: 32px;
    z-index: 9999;
    width: 100%;
    color: white;
}

#main {
    margin-top: 31px;
    margin-left: 0;
    overflow-y: auto;
    left: 0;
    opacity: 1;
    transition: all .3s ease-out;
}

#titlebar {
    padding: 4px;
}

#titlebar #drag-region {
    width: 100%;
    height: 100%;
    -webkit-app-region: drag;
}

#titlebar {
    top: 0;
}

#window-controls {
    display: grid;
    grid-template-columns: repeat(3, 46px);
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    font-family: "Segoe MDL2 Assets";
    font-size: 10px;
}

#window-controls .button {
    grid-row: 1 / span 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

#window-controls #min-button {
    grid-column: 1;
}

#window-controls #max-button, #window-controls #restore-button {
    grid-column: 2;
}

#window-controls #close-button {
    grid-column: 3;
}

#window-controls {
    -webkit-app-region: no-drag;
}

#window-controls .button {
    user-select: none;
    cursor: default;
}

#window-controls .button:hover {
    background: rgba(255, 255, 255, 0.1);
}

#window-controls .button:active {
    background: rgba(255, 255, 255, 0.2);
}

#close-button:hover {
    background: #E81123 !important;
}

#close-button:active {
    background: #f1707a !important;
    color: #000;
}

#restore-button {
    display: none !important;
}

#titlebar #drag-region {
    display: grid;
    grid-template-columns: auto 138px;
}

#window-title {
    grid-column: 1;
    display: flex;
    align-items: center;
    margin-left: 8px;
    overflow-x: hidden;
    font-family: "Segoe UI", sans-serif;
    font-size: 12px;
}

#window-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    font-family: system-ui !important;
}

.maximized #titlebar {
    width: 100%;
    padding: 0;
}

.maximized #window-title {
    margin-left: 12px;
}

.maximized #restore-button {
    display: flex !important;
}

.maximized #max-button {
    display: none;
}

#window-controls * {
    transition: opacity 0.3s;
}

main {
    margin-top: 32px;
}

input {
    padding: 10px;
}

h1 {
    color: white;
}

p {
    color: white;
    opacity: 0.85;
    font-size: 13px;
    font-style: italic;
}

input[type=button] {
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    padding: 10px 20px;
    margin: 10px 5px;
    width: fit-content;
    outline: none;
    background: #999;
}

input[type=button]:hover {
    box-shadow: 0 0 0 3px #ccc inset;
}

input[type=button]:active {
    box-shadow: none !important;
    animation: clickItem 0.5s;
}

@keyframes clickItem {
    0% {
        transform: scale(0.97);
    }
    100% {

    }
}

input[type=text] {
    box-shadow: 0 0 0 3px #cccccc55 inset;
    outline: none;
    background: #00000077;
    color: white;
}

input[type=text]:hover {
    box-shadow: 0 0 0 3px #ccccccaa inset;
    background: #000000bb;
}

input[type=text]:focus {
    box-shadow: 0 0 0 3px #888 inset;
    background: #fff;
    color: black;
}